
# INTRO

# Clear all variables
rm(list = ls(all = TRUE))

# Load packages
library(readxl)
library(tidyverse)
library(rio)

# Set working directory
setwd("") # write here where your wd is

# Make datasets graph

datasets <- read_csv2("Datasets.csv")

datasets_figure <- ggplot(datasets, aes(x = reorder(dataset, freq), y = freq)) + 
  geom_col(fill = "blue", colour="black") + 
  geom_text(aes(label=freq), hjust=-0.7) +
  labs(title = "", 
       x = "",
       y = "Frequency") +
  #scale_y_continuous(breaks=seq(0, 150, 25)) +
  ylim(0,40) +
  theme_bw() +
  coord_flip()
datasets_figure

ggsave(datasets_figure, file="Datasets Figure.jpg", dpi=2000, width=9, height=6)
